package com.subang.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.subang.function.mapper.SbMessageBoardMapper;
import com.subang.function.domain.SbMessageBoard;
import com.subang.function.service.ISbMessageBoardService;

/**
 * 留言板Service业务层处理
 * 
 * @author subei
 * @date 2025-04-07
 */
@Service
public class SbMessageBoardServiceImpl implements ISbMessageBoardService 
{
    @Autowired
    private SbMessageBoardMapper sbMessageBoardMapper;

    /**
     * 查询留言板
     * 
     * @param id 留言板主键
     * @return 留言板
     */
    @Override
    public SbMessageBoard selectSbMessageBoardById(Long id)
    {
        return sbMessageBoardMapper.selectSbMessageBoardById(id);
    }

    /**
     * 查询留言板列表
     * 
     * @param sbMessageBoard 留言板
     * @return 留言板
     */
    @Override
    public List<SbMessageBoard> selectSbMessageBoardList(SbMessageBoard sbMessageBoard)
    {
        return sbMessageBoardMapper.selectSbMessageBoardList(sbMessageBoard);
    }

    /**
     * 新增留言板
     * 
     * @param sbMessageBoard 留言板
     * @return 结果
     */
    @Override
    public int insertSbMessageBoard(SbMessageBoard sbMessageBoard)
    {
        return sbMessageBoardMapper.insertSbMessageBoard(sbMessageBoard);
    }

    /**
     * 修改留言板
     * 
     * @param sbMessageBoard 留言板
     * @return 结果
     */
    @Override
    public int updateSbMessageBoard(SbMessageBoard sbMessageBoard)
    {
        return sbMessageBoardMapper.updateSbMessageBoard(sbMessageBoard);
    }

    /**
     * 批量删除留言板
     * 
     * @param ids 需要删除的留言板主键
     * @return 结果
     */
    @Override
    public int deleteSbMessageBoardByIds(Long[] ids)
    {
        return sbMessageBoardMapper.deleteSbMessageBoardByIds(ids);
    }

    /**
     * 删除留言板信息
     * 
     * @param id 留言板主键
     * @return 结果
     */
    @Override
    public int deleteSbMessageBoardById(Long id)
    {
        return sbMessageBoardMapper.deleteSbMessageBoardById(id);
    }
}
